<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/include.inc.jsp"%>
<div class="pageContent">
<script type="text/javascript">
	function checkPwd(form){
		if($("#newPwd").val()!=$("#newPwd2").val()){
			alertMsg.error('两次输入密码不一致！');
			return false;
		}
		return validateCallback(form, callback);
	}
	callback = function(json){
		DWZ.ajaxDone(json);
		if (json.statusCode == DWZ.statusCode.ok){
			$.pdialog.closeCurrent();
		}
		
	}
</script>
<form id="pwdForm" method="post" action="${contextPath}/user/updatePwd" class="required-validate pageForm" onsubmit="return checkPwd(this)">
	<div class="pageFormContent" layoutH="58">
		<input type="hidden" name="id" value="${user.id}"/>
		<p>
			<label>原密码：</label>
			<input type="password" id="oldPwd" name="oldPwd"  class="input-medium validate[required,maxSize[32]] required" maxlength="32"/>
		</p>
		<p>
			<label>新密码：</label>
			<input type="password" id="newPwd" name="newPwd" class="input-medium validate[required] alphanumeric" minlength="6" maxlength="32"/>
		</p>		
		
		<p>
			<label>再次输入新密码：</label>
			<input type="password" id="newPwd2" name="newPwd2" class="input-medium validate[required]" equalto="#newPwd" maxlength="32"/>
		</p>
		
	</div>
			
	<div class="formBar">
		<ul>
			<li><div class="button"><div class="buttonContent"><button type="submit">确定</button></div></div></li>
			<li><div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div></li>
		</ul>
	</div>
</form>
</div>